package cn.wildfire.chat.kit.group.manage;

import com.sourcemuch.im.caiba.R;import com.sourcemuch.im.caiba.R2;

import cn.wildfire.chat.app.extendsion.utils.TextUtils;
import cn.wildfire.chat.kit.WfcBaseActivity;
import cn.wildfirechat.model.GroupInfo;

public class GroupManageActivity extends WfcBaseActivity {

    GroupManageFragment groupManageFragment;

    @Override
    protected void afterViews() {
        GroupInfo groupInfo = getIntent().getParcelableExtra("groupInfo");
        String normalManager = getIntent().getStringExtra("normal_manager");
        groupManageFragment = GroupManageFragment.newInstance(groupInfo);
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.containerFrameLayout, groupManageFragment)
                .commit();
        if (normalManager != null && !TextUtils.isTextEmpty(normalManager)) {
            groupManageFragment.setNormalManager(normalManager.equals("1"));
        }
    }

    @Override
    protected int contentLayout() {
        return R.layout.fragment_container_activity;
    }

    @Override
    protected void setTitleCenterThenSetSearchView() {
        super.setTitleCenterThenSetSearchView();
        setToolbarOrReplaceType(true, 2);
        setReplaceTitle(getTitle().toString(), -1);
        setSearchLayoutVisibility(false);
    }
}
